package io.zhengsh.javase;

public class StringPoolDemo {

    public static void main(String[] args) {
        String str1 = new StringBuilder("hello ").append("world").toString();
        System.out.println(str1);
        System.out.println(str1.intern());


        System.out.println();
        String str2 = new StringBuilder("ja").append("va").toString();
        System.out.println(str2);
        System.out.println(str2.intern());

    }
}
